(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function() {
  'use strict';
  var COOKIE_NAME, abConfig, getScriptToLoad, getVersion, readJsonCookie, setJsonCookie, _ref;

  abConfig = ((_ref = require("./von_configuration")) != null ? _ref.abtest : void 0) || {};

  COOKIE_NAME = 'vn_abtest';

  readJsonCookie = function(name) {
    var cookie, cookies, _i, _len;
    name += '=';
    cookies = document.cookie.split(/;\s*/);
    for (_i = 0, _len = cookies.length; _i < _len; _i++) {
      cookie = cookies[_i];
      if (cookie.indexOf(name) === 0) {
        try {
          return JSON.parse(decodeURIComponent(cookie.replace(name, '')));
        } catch (_error) {
          return void 0;
        }
      }
    }
  };

  setJsonCookie = function(name, value) {
    var date;
    if (!JSON) {
      return;
    }
    date = new Date();
    date.setFullYear(date.getFullYear() + 1);
    return document.cookie = "" + name + "=" + (encodeURIComponent(JSON.stringify(value))) + "; expires=" + (date.toGMTString()) + "; path=/";
  };

  getVersion = function() {
    var cookie;
    cookie = readJsonCookie(COOKIE_NAME);
    if ((cookie != null ? cookie.revision : void 0) !== abConfig.revision) {
      cookie = null;
    }
    if (!cookie) {
      cookie = {
        revision: abConfig.revision,
        group: Math.floor(Math.random() * 100)
      };
      setJsonCookie(COOKIE_NAME, cookie);
    }
    if (cookie.group < abConfig.A.percentage) {
      return 'A';
    } else {
      return 'B';
    }
  };

  getScriptToLoad = function() {
    return abConfig[getVersion()].jsUrl;
  };

  module.exports = {
    getVersion: getVersion,
    getScriptToLoad: getScriptToLoad
  };

}).call(this);

},{"./von_configuration":3}],2:[function(require,module,exports){
(function() {
  'use strict';
  var abHelper, config;

  abHelper = require("./abtest_helper");

  config = require("./von_configuration");

  (function(d) {
    var addScript, scriptToLoad, version;
    addScript = function(url) {
      var s;
      s = d.createElement("script");
      s.type = "text/javascript";
      s.async = true;
      s.src = url;
      return d.getElementsByTagName("head")[0].appendChild(s);
    };
    version = "0.1";
    scriptToLoad = config.abtest.enabled ? abHelper.getScriptToLoad() : config.singletagUrl;
    if (scriptToLoad) {
      return addScript(scriptToLoad);
    }
  })(document);

}).call(this);

},{"./abtest_helper":1,"./von_configuration":3}],3:[function(require,module,exports){
(function() {
  'use strict';
  var DEFAULT_SINGLETAG_URL, displayLoadingScreen, messageSwitch, wait;

  DEFAULT_SINGLETAG_URL = 'https://revolve.viralninjas.com/static/singletag/singletag.js';

  if (navigator.userAgent.match('CriOS') && !/teambuy.*viralninjas.com/.test(window.location.href)) {
    wait = function() {
      var vnContainer, vnModal, vnOverlay;
      vnModal = document.getElementById('viralninjasModal');
      vnOverlay = document.getElementById('viralninjasOverlay');
      vnContainer = document.getElementById('vnContainer');
      if (vnModal && vnModal.style.display === "block") {
        vnModal.style.display = 'none';
      }
      if (vnOverlay && vnOverlay.style.display === "block") {
        vnOverlay.style.display = 'none';
      }
      if (vnContainer && vnContainer.style.display === "") {
        vnContainer.style.display = 'none';
      }
      return setTimeout(wait, 100);
    };
    setTimeout(wait, 100);
  }

  displayLoadingScreen = function(data) {
    var shouldDisplay;
    data = data.split('|');
    if (data.length > 1) {
      shouldDisplay = data[1];
    }
    return document.getElementById('redirect-step1-hotfix').style.display = (shouldDisplay === 'true' ? "" : "none");
  };

  messageSwitch = function(message) {
    var data;
    if (message && message.data) {
      data = message.data;
    }
    if (data.indexOf('displayLoadingScreen') > -1) {
      return displayLoadingScreen(data);
    }
  };

  if (window.addEventListener) {
    window.addEventListener("message", messageSwitch);
  } else {
    window.attachEvent("onmessage", messageSwitch);
  }

  /* Per customer request*/


  if (window.location.href.indexOf('OrderSummary') > 0) {
    window.vnColorboxHotfix = {
      run: function() {
        var wasPreviouslyLoaded;
        wasPreviouslyLoaded = false;
        wait = function() {
          var vnModal, vnOverlay;
          vnModal = document.getElementById("viralninjasModal");
          vnOverlay = document.getElementById("viralninjasOverlay");
          if ((vnModal && vnModal.style.display === "block") && (vnOverlay && vnOverlay.style.display === "block")) {
            wasPreviouslyLoaded = true;
          }
          if (wasPreviouslyLoaded && (vnModal && vnModal.style.display === "none") && (vnOverlay && vnOverlay.style.display === "none")) {
            return loadSurvey();
          } else {
            return setTimeout(wait, 50);
          }
        };
        return setTimeout(wait, 50);
      }
    };
    window.vnColorboxHotfix.run();
  }

  module.exports = {
    singletagUrl: DEFAULT_SINGLETAG_URL,
    abtest: {
      enabled: false,
      revision: 1,
      A: {
        percentage: 100,
        jsUrl: DEFAULT_SINGLETAG_URL
      },
      B: {
        jsUrl: DEFAULT_SINGLETAG_URL
      }
    }
  };

}).call(this);

},{}]},{},[2])